//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.wsd.smartcarwasher.constans;

import org.json.JSONArray;
import org.json.JSONObject;

public enum MachineEvent {
    A_01("A", "A-01", "紧急停止", ""),
    A_02("A", "A-02", "横刷架左断带检测异常！", ""),
    A_03("A", "A-03", "横刷架右断带检测异常！", ""),
    A_04("A", "A-04", "限高保护检测异常！", ""),
    A_05("A", "A-05", "立刷垂直保护检测异常！", ""),
    A_06("A", "A-06", "左柜防撞检测检测异常！", ""),
    A_07("A", "A-07", "右柜防撞检测检测异常！", ""),
    B_01("B", "B-01", "行车架变频器状态异常！", ""),
    B_02("B", "B-02", "车头位置检测异常！", ""),
    B_03("B", "B-03", "车尾位置检测异常！", ""),
    B_04("B", "B-04", "横刷架上限位检测异常！", ""),
    B_05("B", "B-05", "横刷架下限位检测异常！", ""),
    B_06("B", "B-06", "立刷左靠近1异常！", ""),
    B_07("B", "B-07", "立刷左离开2异常！", ""),
    B_08("B", "B-08", "立刷右靠近1异常！", ""),
    B_09("B", "B-09", "立刷右离开2异常！", ""),
    B_10("B", "B-10", "立刷左中间检测异常！", ""),
    B_11("B", "B-11", "立刷右中间检测异常！", ""),
    B_12("B", "B-12", "立刷左零点检测异常！", ""),
    B_13("B", "B-13", "立刷右零点检测异常！", ""),
    B_14("B", "B-14", "横刷架升降保护1检测异常！", ""),
    B_15("B", "B-15", "横刷架升降保护2检测异常！", ""),
    B_16("B", "B-16", "摆臂气缸左收回检测异常！", ""),
    B_17("B", "B-17", "摆臂气缸右收回检测异常！", ""),
    B_18("B", "B-18", "行车架零点检测异常！", ""),
    B_19("B", "B-19", "行车架限位检测异常！", ""),
    B_20("B", "B-20", "立刷正转反馈检测异常！", ""),
    B_21("B", "B-21", "立刷反转反馈检测异常！", ""),
    B_22("B", "B-22", "横刷旋转反馈检测异常！", ""),
    B_23("B", "B-23", "风机1反馈检测异常！", ""),
    B_24("B", "B-24", "风机2反馈检测异常！", ""),
    B_25("B", "B-25", "横刷升降保护2检测异常！", ""),
    B_26("B", "B-26", "气压检测异常", ""),
    C_01("C", "C-01", "设备启动，准备清洗车辆", "{\"machineId\": \"35\",\"orderSn\": \"order_oIdIdJhBz7FpBqlssNgPyrgIiC\",\"message\": {\"messageCode\": \"C-01\"}}"),
    C_02("C", "C-02", "顶刷下降", "{\"machineId\": \"35\",\"orderSn\": \"order_oIdIdJhBz7FpBqlssNgPyrgIiC\",\"message\": {\"messageCode\": \"C-02\"}}"),
    C_03("C", "C-03", "正在顶刷洗车头", ""),
    C_04("C", "C-04", "正在清洗车辆车头", "{\"machineId\": \"35\",\"orderSn\": \"order_oIdIdJhBz7FpBqlssNgPyrgIiC\",\"message\": {\"messageCode\": \"C-04\"}}"),
    C_05("C", "C-05", "正在清洗车头中", ""),
    C_06("C", "C-06", "正在前进清洗车辆侧面", ""),
    C_07("C", "C-07", "正在清洗车辆车尾", ""),
    C_08("C", "C-08", "正在清洗车尾中", ""),
    C_09("C", "C-09", "正在反向清洗车辆侧面", ""),
    C_10("C", "C-10", "正在进行清水冲洗", ""),
    C_11("C", "C-11", "正在喷洒水蜡", ""),
    C_12("C", "C-12", "正在吹干车辆车尾", ""),
    C_13("C", "C-13", "正在吹干车辆车身", ""),
    C_14("C", "C-14", "正在吹干车辆车头", ""),
    C_15("C", "C-15", "正在进行风干", ""),
    C_16("C", "C-16", "洗车完成", "{\"machineId\": \"35\",\"orderSn\": \"order_w0KdifdrxNf2ue1fqyLJGytNIg\",\"message\": {\"messageCode\": \"C-16\"}}"),
    D_01("D", "D-01", "修改指定机器状态", "{'machineId':'1','orderSn':'orderSn_xxx','message':{'messageCode':'D-01','status': 2}} 1为营业中，2为暂停营业"),
    D_02("D", "D-02", "修改指定机器在线状态", "{'machineId':'1','orderSn':'orderSn_xxx','message':{'messageCode':'D-01','status': 0}} 0为离线，1为在线"),

    D_03("D", "D-03", "停车位置合格", "{\"machineId\": \"51\", \"orderSn\": \"orderSn 123 \", \"message\": {\"level\": \"D\", \"messageCode\": \"D-01\", \"status\": 1, \"ack\": \"true\", \"messageId\": \"e0b3da40-3b67-11ea-b49f-7ce9d3b60fc6\"}}"),
    D_04("D", "D-04", "没停到位置","{\"machineId\": \"51\", \"orderSn\": \"orderSn 123 \", \"message\": {\"level\": \"D\", \"messageCode\": \"D-04\", \"status\": 1,  \"ack\": \"true\", \"messageId\": \"e0b3da40-3b67-11ea-b49f-7ce9d3b60fc6\"}}"),
    D_05("D", "D-05", "设备没有停到位"," {\"machineId\": \"51\", \"orderSn\": \"orderSn 123 \", \"message\": {\"level\": \"D\", \"messageCode\": \"D-05\", \"status\": 1,\"ack\": \"true\", \"messageId\": \"e0b3da40-3b67-11ea-b49f-7ce9d3b60fc6\"}}  "),


    D_88("D", "D-88", "机器正在复位", "{'machineId':'1','orderSn':'orderSn_xxx','message':{'messageCode':'D-01','status': 0}} 0为离线，1为在线"),
    D_100("D", "D-100", "机器复位成功", "{'machineId':'1','orderSn':'orderSn_xxx','message':{'messageCode':'D-01','status': 0}} 0为离线，1为在线"),
    D_99("D", "D-99", "没用复位成功", "{'machineId':'1','orderSn':'orderSn_xxx','message':{'messageCode':'D-01','status': 0}} 0为离线，1为在线"),

    E_01("E", "E-01", "获取排队照片", "{\"machineId\": \"51\", \"orderSn\": \"orderSn 123 \", \"message\": {\"level\": \"C\", \"messageCode\": \"C-14\", \"status\": 1, \"ack\": \"true\", \"messageId\": \"bc9b4a0a-3740-11ea-a2c2-7ce9d3b60fc6\"}} "),
    E_02("E", "E-02", "获取洗车前照片", "{\"machineId\": \"51\", \"orderSn\": \"orderSn 123 \", \"message\": {\"level\": \"C\", \"messageCode\": \"C-14\", \"status\": 1, \"ack\": \"true\", \"messageId\": \"bc9b4a0a-3740-11ea-a2c2-7ce9d3b60fc6\"}}  "),


    F_01("F","F-01","停放位置是否合理，车辆超宽超高","{\"machineId\":\"51\",\"orderSn\":\"orderSn 123 \",\"ack\":true,\"message\":{\"level\":\"F\",\"ack\":\"true\",\"messageCode\":\"F-01\",\"messageId\":\"42f44fca-39dc-11ea-93db-7ce9d3b60fc6\",\"status\":\"1\"}"),
    F_02("F","F-02","停放位置是否合理，车辆是否移动，设备其它原因","{\"machineId\":\"51\",\"orderSn\":\"orderSn 123 \",\"ack\":true,\"message\":{\"level\":\"F\",\"ack\":\"true\",\"messageCode\":\"F-02\",\"messageId\":\"42f44fca-39dc-11ea-93db-7ce9d3b60fc6\",\"status\":\"1\"}"),
    F_03("F","F-03","不能清洗的车辆类型","{\"machineId\":\"51\",\"orderSn\":\"orderSn 123 \",\"ack\":true,\"message\":{\"level\":\"F\",\"ack\":\"true\",\"messageCode\":\"F-03\",\"messageId\":\"42f44fca-39dc-11ea-93db-7ce9d3b60fc6\",\"status\":\"1\"}"),
    F_04("F","F-04","洗车过程中车辆移动","{\"machineId\":\"51\",\"orderSn\":\"orderSn 123 \",\"ack\":true,\"message\":{\"level\":\"F\",\"ack\":\"true\",\"messageCode\":\"F-04\",\"messageId\":\"42f44fca-39dc-11ea-93db-7ce9d3b60fc6\",\"status\":\"1\"}"),
    F_05("F","F-05","洗车过程中车辆移动","{\"machineId\":\"51\",\"orderSn\":\"orderSn 123 \",\"ack\":true,\"message\":{\"level\":\"F\",\"ack\":\"true\",\"messageCode\":\"F-05\",\"messageId\":\"42f44fca-39dc-11ea-93db-7ce9d3b60fc6\",\"status\":\"1\"}"),
    F_06("F","F-06","洗车过程中车辆移动","{\"machineId\":\"51\",\"orderSn\":\"orderSn 123 \",\"ack\":true,\"message\":{\"level\":\"F\",\"ack\":\"true\",\"messageCode\":\"F-06\",\"messageId\":\"42f44fca-39dc-11ea-93db-7ce9d3b60fc6\",\"status\":\"1\"}"),
    F_07("F","F-07","洗车过程中车辆移动","{\"machineId\":\"51\",\"orderSn\":\"orderSn 123 \",\"ack\":true,\"message\":{\"level\":\"F\",\"ack\":\"true\",\"messageCode\":\"F-07\",\"messageId\":\"42f44fca-39dc-11ea-93db-7ce9d3b60fc6\",\"status\":\"1\"}"),
    F_08("F","F-08","机器自动停止","{\"machineId\":\"51\",\"orderSn\":\"orderSn 123 \",\"ack\":true,\"message\":{\"level\":\"F\",\"ack\":\"true\",\"messageCode\":\"F-08\",\"messageId\":\"42f44fca-39dc-11ea-93db-7ce9d3b60fc6\",\"status\":\"1\"}");

    private String level;
    private String eventCode;
    private String eventMessage;
    private String example;

    private MachineEvent(String level, String eventCode, String eventMessage, String example) {
        this.level = level;
        this.eventCode = eventCode;
        this.eventMessage = eventMessage;
        this.example = example;
    }

    public String getLevel() {
        return this.level;
    }

    public String getEventCode() {
        return this.eventCode;
    }

    public String getEventMessage() {
        return this.eventMessage;
    }

    public static MachineEvent matchEvent(String eventCode) {
        MachineEvent[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            MachineEvent machineEvent = var1[var3];
            if (machineEvent.eventCode.equalsIgnoreCase(eventCode)) {
                return machineEvent;
            }
        }

        return null;
    }

    public String toJsonString() {
        return this.toJson().toString();
    }

    private JSONObject toJson() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("level", this.level);
        jsonObject.put("messageCode", this.eventCode);
        jsonObject.put("message", this.eventMessage);
        jsonObject.put("example", this.example);
        return jsonObject;
    }

    public static JSONArray allEvent() {
        JSONArray jsonArray = new JSONArray();
        MachineEvent[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            MachineEvent machineEvent = var1[var3];
            jsonArray.put(machineEvent.toJson());
        }

        return jsonArray;
    }

    public static void main(String[] args) {
        //System.out.println(allEvent().toString());
    }
}
